"""
@-*- coding: utf-8 -*-
@ python: 3.12.3
@ 创建者: JacksonCode
@ 创建时间: 2025-11-07
"""
import json

from flask import Flask

from app import create_app
from app.extensions import db

app = create_app()


# @app.route("/")
# def index():
#     return json.dumps({"code": 200, "data": "hello world", "msg": "success"})

# @app.before_first_request   # 已过期
# def create_tables():
#     db.create_all()

# 在应用上下文中创建数据库表（开发用）
# with app.app_context():
#     db.create_all()


if __name__ == '__main__':
    app.run(host="127.0.0.1", port=8569, debug=True)
